<script lang="ts" setup>
import { ref } from "vue";
// 引入Tabbar组件
import Tabbar from "@/components/Tabbar.vue";
// 引入欢迎页组件
import ComeCard from "@/components/ComeCard/index.vue";
// 引入tabbar store
import { useTabbarStore } from "@/store";
// 获取tabbar store
const store = useTabbarStore();
// 获取用户登录凭证
const show = ref<boolean>(!!localStorage.getItem("token"));
</script>
<style lang="scss">
// 隐藏滚动条
div,
ul,
li {
  -ms-overflow-style: none;
  scrollbar-width: none;

  &:-webkit-scrollbar {
    display: none;
  }
}
</style>
<template>
  <div>
    <!-- 路由出口 -->
    <router-view></router-view>
    <!-- tabbar 组件 判断是否为tabbar页面 是则显示 否则隐藏 -->
    <Tabbar v-show="[0, 1, 2, 3].includes(store.active)" />
    <!-- 欢迎页 用户登录展示 -->
    <ComeCard v-show="show && store.hide" />
  </div>
</template>

<style></style>
